﻿namespace EasyWeb.Data
{
    using System.Data;

    public class EWFieldDefinitionColumn
    {
        private DbType type;

        public string Name { get; set; }

        public DbType Type
        {
            get { return this.type; }
            set
            {
                EWGuard.IsDefinedEnum(value, "value");
                this.type = value;
            }
        }

        public int Length { get; set; }

        public bool IsNullable { get; set; }

        public bool IsUnique { get; set; }
    }
}
